<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="NumberUtil,jp.raohmaru.utils.NumberUtil,colorToARGB,decimalLenght,isEven,isFloat,isInt,isNaN,isNotNaN,toFixed" name="keywords">
<title>jp.raohmaru.utils.NumberUtil</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'NumberUtil - Raohmaru AS3 Framework';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">Raohmaru AS3 

Framework</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?jp/raohmaru/utils/NumberUtil.html&amp;jp/raohmaru/utils/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;NumberUtil</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class NumberUtil"); titleBar_setSubNav(false,false,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">jp.raohmaru.utils</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class NumberUtil</td>
</tr>
</table>
<p></p>
 Conjunto de métodos que amplían las funcionalidades de la clase Number.
 <p></p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">Number</div>
<br>
<hr>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#colorToARGB()">colorToARGB</a>(rgb:uint, alpha:uint = 255):uint</div>
<div class="summaryTableDescription">[static]
  Obtiene un valor de color ARGB a partir de un color RGB y un valor de alpha.</div>
</td><td class="summaryTableOwnerCol">NumberUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#decimalLenght()">decimalLenght</a>(n:Number):uint</div>
<div class="summaryTableDescription">[static]
 Devuelve el número de decimales que contiene un número
 </div>
</td><td class="summaryTableOwnerCol">NumberUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isEven()">isEven</a>(value:Number):Boolean</div>
<div class="summaryTableDescription">[static]
 Comprueba si un número es par.</div>
</td><td class="summaryTableOwnerCol">NumberUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isFloat()">isFloat</a>(value:Number):Boolean</div>
<div class="summaryTableDescription">[static]
 Comprueba si el valor es un número de coma flotante.</div>
</td><td class="summaryTableOwnerCol">NumberUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isInt()">isInt</a>(value:Number):Boolean</div>
<div class="summaryTableDescription">[static]
 Comprueba si un valor númerico es un entero.</div>
</td><td class="summaryTableOwnerCol">NumberUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isNaN()">isNaN</a>(value:Number):Boolean</div>
<div class="summaryTableDescription">[static]
 Devuelve <code>true</code> si el valor es <code>NaN</code> (no es un número).</div>
</td><td class="summaryTableOwnerCol">NumberUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#isNotNaN()">isNotNaN</a>(value:Number):Boolean</div>
<div class="summaryTableDescription">[static]
 Devuelve <code>true</code> si el valor es un número.</div>
</td><td class="summaryTableOwnerCol">NumberUtil</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#toFixed()">toFixed</a>(n:Number, fractionDigits:uint):Number</div>
<div class="summaryTableDescription">[static]
  Redondea el número en notación de coma fija.</div>
</td><td class="summaryTableOwnerCol">NumberUtil</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="colorToARGB()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">colorToARGB</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public static function colorToARGB(rgb:uint, alpha:uint = 255):uint</code><p>
  Obtiene un valor de color ARGB a partir de un color RGB y un valor de alpha.
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">rgb</span>:uint</code> &mdash; El valor de un color RGB en hexadecimal.
  </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">alpha</span>:uint</code> (default = <code>255</code>)<code></code> &mdash; La cantidad de transparencia asignada al color. Debe ser un valor comprendido entre 0x00 y 0xFF (0 y 255).
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>uint</code> &mdash; Un color en formato ARGB.
  </td>
</tr>
</table>
</div>
<a name="decimalLenght()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">decimalLenght</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function decimalLenght(n:Number):uint</code><p>
 Devuelve el número de decimales que contiene un número
 </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">n</span>:Number</code> &mdash; Número
 </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>uint</code> &mdash; uint
 </td>
</tr>
</table>
</div>
<a name="isEven()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isEven</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function isEven(value:Number):Boolean</code><p>
 Comprueba si un número es par.
 </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">value</span>:Number</code> &mdash; Número a comprobar
 </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; Boolean
 </td>
</tr>
</table>
</div>
<a name="isFloat()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isFloat</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function isFloat(value:Number):Boolean</code><p>
 Comprueba si el valor es un número de coma flotante.
 </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">value</span>:Number</code> &mdash; Número a comprobar
 </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; Boolean
 </td>
</tr>
</table>
</div>
<a name="isInt()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isInt</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function isInt(value:Number):Boolean</code><p>
 Comprueba si un valor númerico es un entero.
 </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">value</span>:Number</code> &mdash; Número a comprobar
 </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; Boolean
 </td>
</tr>
</table>
</div>
<a name="isNaN()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isNaN</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function isNaN(value:Number):Boolean</code><p>
 Devuelve <code>true</code> si el valor es <code>NaN</code> (no es un número).
 Este método es una versión optimizada de la funcion global <code>isNaN()</code>.
 </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">value</span>:Number</code> &mdash; Valor numérico o expresión matemática que se va a evaluar.
 </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; Boolean Devuelve <code>true</code> si el valor es <code>NaN</code> (no es un número) y <code>false</code> en caso contrario. 
 </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">isNaN</div>
</div>
<a name="isNotNaN()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">isNotNaN</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function isNotNaN(value:Number):Boolean</code><p>
 Devuelve <code>true</code> si el valor es un número.
 Este método es una versión optimizada de la funcion global <code>!isNaN()</code>.
 </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">value</span>:Number</code> &mdash; Valor numérico o expresión matemática que se va a evaluar.
 </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; Boolean Devuelve <code>true</code> si el valor es un número y <code>false</code> en caso contrario (es NaN). 
 </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../utils/NumberUtil.html#isNaN()" target="">isNaN()</a>
</div>
</div>
<a name="toFixed()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">toFixed</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function toFixed(n:Number, fractionDigits:uint):Number</code><p>
  Redondea el número en notación de coma fija. La notación de coma fija significa que la cadena contendrá un número concreto de
  dígitos tras la coma decimal, conforme a lo especificado en el parámetro <code>fractionDigits</code>. El rango válido para el
  parámetro <code>fractionDigits</code> va de 0 a 20. Al especificar un valor situado fuera de este rango, se emite una excepción. 
  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">n</span>:Number</code> &mdash; Número a redondear.
  </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">fractionDigits</span>:uint</code> &mdash; Un entero entre 0 y 20, ambos inclusive, que representa el número deseado de cifras decimales.
  </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; Number
  </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">Number.toFixed()</div>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright">http://www.raohmaru.com</center>
</div>
</body>
</html>
<!--http://www.raohmaru.com-->
